package cn.itcast.nems.order.web.controller;

import cn.itcast.nems.enrol.service.impl.EnrolQuickConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Component
@RestController
@RequestMapping("/home")
public class IndexController {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private EnrolQuickConfig config;

    @GetMapping("/index")
    public ResponseEntity<String> index() {
        logger.info("EnrolQuickConfig:{}", config);
        return ResponseEntity.ok("I'm running");
    }

}
